<template>
	<view class="content">
		<block v-if="dataList.length>0">
		<view class="jf-item-box" v-for="(item,index) in dataList" :key="index">
			<view class="left-box">
				<text>{{item.title}}</text>
				<text>{{item.create_time}}</text>
			</view>
			<view class="right-box" v-if="item.pm==1">{{item.number}}积分</view>
			<view class="right-box" v-else>-{{item.number}}积分</view>
		</view>
		</block>
		<!-- 无记录状态 -->
		<block v-else>
			<icon-status :imgUrl="'../../pageMember/static/icon9.png'" :statusInfo="'暂无数据'"></icon-status>
		</block>
	</view>
</template>

<script>
	import iconStatus from '@/components/noRecordIcon/iconStatus.vue';
	export default {
		components:{
			iconStatus
		},
		data(){
			return {
				dataList:[],
			}
		},
		onLoad() {
			uni.showLoading({title:"加载中"});
			this.myIntegralBill();
		},
		methods:{
			myIntegralBill(){
				this.$u.api.integralBillApi({}).then(res=>{
					if(res.code==1){
						console.log('我的积分：',res);
						this.dataList = res.data;
					}
				});
			},
		},
		onReachBottom(){

		}
	}
</script>

<style lang="scss" scoped>
	.content{
		width: 100%;
		font-family: Microsoft YaHei;
		box-sizing: border-box;
		padding: 0 20rpx;
		.jf-item-box{
			padding: 30rpx 0;
			display: flex;
			border-bottom: 1rpx solid #eee;
			.left-box{
				flex: 0.7;
				text{display: block;}
				text:first-child{
					margin-bottom: 10rpx;
					font-size: 30rpx;
					font-weight: 400;
					color: #181818;
				}
				text:last-child{
					font-size: 23rpx;
					font-weight: 400;
					color: #666666;
				}
			}
			.right-box{
				flex: 0.3;
				font-size: 30rpx;
				font-weight: bold;
				color: #181818;
				align-self: center;
				text-align: right;
			}
		}
	}
</style>